import request from "@/utils/request";

const api_name = "/admin/vod/teacher";

export default {
  //讲师列表
  pageList(page, limit, searchObj) {
    return request({
      url: `${api_name}/${page}/${limit}`,
      method: `post`,
      data: searchObj,
    });
  },
  removeById(id) {
    return request({
      url: `${api_name}/remove/${id}`,
      method: "delete",
    });
  },
  saveTeacher(teacher) {
    return request({
      url: `${api_name}/save`,
      method: "post",
      data: teacher,
    });
  },
  getTeacherById(id) {
    return request({
      url: `${api_name}/get/${id}`,
      method: "get",
    });
  },
  updateTeacher(teacher) {
    return request({
      url: `${api_name}/update`,
      method: "put",
      data: teacher,
    });
  },
  batchRemove(ids) {
    return request({
      url: `${api_name}/batchRemove`,
      method: "delete",
      data:ids
    });
  },
  list(){
    return request({
      url: `${api_name}/findAll`,
      method: "get",
    });
  },
};
